namespace JGSY.CMS.LowCode.Platform.Application.Interfaces
{
    /// <summary>
    /// 租户监控服务接口
    /// </summary>
    public interface ITenantMonitoringService
    {
        // 系统监控
        Task<object> GetSystemMetricsAsync(Guid tenantId);
        Task<List<object>> GetSystemMetricsHistoryAsync(Guid tenantId, DateTime startTime, DateTime endTime);
        Task<object> GetSystemHealthAsync(Guid tenantId);
        
        // 性能监控
        Task<object> GetPerformanceMetricsAsync(Guid tenantId);
        Task<List<object>> GetPerformanceMetricsHistoryAsync(Guid tenantId, DateTime startTime, DateTime endTime);
        Task<object> GeneratePerformanceReportAsync(Guid tenantId, DateTime startTime, DateTime endTime);
        
        // 用户活动监控
        Task<object> GetUserActivityAsync(Guid tenantId);
        Task<List<object>> GetUserActivityHistoryAsync(Guid tenantId, DateTime startTime, DateTime endTime);
        Task<object> GetUserActivitySummaryAsync(Guid tenantId, DateTime date);
        
        // 错误监控
        Task<List<object>> GetErrorLogsAsync(Guid tenantId, int pageIndex = 0, int pageSize = 50);
        Task<object> GetErrorLogAsync(Guid errorId);
        Task<object> GetErrorStatisticsAsync(Guid tenantId, DateTime startTime, DateTime endTime);
        Task MarkErrorAsResolvedAsync(Guid errorId, string resolution);
        
        // 警报管理
        Task<List<object>> GetAlertsAsync(Guid tenantId);
        Task<object> CreateAlertAsync(Guid tenantId, object request);
        Task<object> UpdateAlertAsync(Guid alertId, object request);
        Task DeleteAlertAsync(Guid alertId);
        Task<List<object>> GetTriggeredAlertsAsync(Guid tenantId);
        
        // 实时监控
        Task<object> GetRealTimeMetricsAsync(Guid tenantId);
        Task StartRealTimeMonitoringAsync(Guid tenantId);
        Task StopRealTimeMonitoringAsync(Guid tenantId);
        
        // 报告生成
        Task<byte[]> GenerateMonitoringReportAsync(Guid tenantId, DateTime startTime, DateTime endTime, string format = "pdf");
        Task<byte[]> GenerateDashboardAsync(Guid tenantId, string format = "pdf");
        
        // 阈值管理
        Task<List<object>> GetThresholdsAsync(Guid tenantId);
        Task<object> CreateThresholdAsync(Guid tenantId, object request);
        Task<object> UpdateThresholdAsync(Guid thresholdId, object request);
        Task DeleteThresholdAsync(Guid thresholdId);
        
        // 趋势分析
        Task<object> AnalyzeTrendsAsync(Guid tenantId, string metricType, DateTime startTime, DateTime endTime);
        Task<List<object>> PredictTrendsAsync(Guid tenantId, string metricType, int days = 30);
    }
}